package steed.util.file.domain;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import steed.hibernatemaster.domain.BaseRelationalDatabaseDomain;

//@Entity
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class OSSFile extends BaseRelationalDatabaseDomain{
	/**
	 * 可以是文件名,相同文件名会覆盖
	 */
	private String fileKey;
	/**
	 * 文件md5
	 */
	private String md5;
	/**
	 * 文件所在bucket
	 */
	private String bucket;
	
	/**
	 * 文件大小
	 */
	private Long length;



	@Id
	@GenericGenerator(name="gen1",strategy="assigned")
	@GeneratedValue(generator="gen1")
	public String getFileKey() {
		return fileKey;
	}

	public void setFileKey(String fileKey) {
		this.fileKey = fileKey;
	}

	public String getMd5() {
		return md5;
	}

	public void setMd5(String md5) {
		this.md5 = md5;
	}

	public String getBucket() {
		return bucket;
	}

	public void setBucket(String bucket) {
		this.bucket = bucket;
	}

	public Long getLength() {
		return length;
	}

	public void setLength(Long length) {
		this.length = length;
	}
	
	
	
}
